package kr.bos.Framework.Utils;

import java.util.Random;

/**
 * 일일이 생성하기 귀찮으니까 걍 만들어놓고 갖다쓴다..
 * @author baek - bispro@uracle.co.kr
 * @date 2011. 12. 29.
 */
public class Rand extends Random{
	private static final long serialVersionUID = 5659661890703721829L;
	private static Rand rand = null;
	public static Rand getInstance() {
		if(rand==null) {
			rand = new Rand();
		}
		return rand;
	}
	
	public String nextString(int len) {
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < len; i++) {
			char ch = (char)('a'+Math.abs(rand.nextInt())%26);
			sb.append(ch);
		}
		return sb.toString();
	}
}
